'''Contains the PySimpleGUI layout for the CSN Claim Manager GUI.'''
import PySimpleGUI as sg


sg.theme('Reddit')

MENU_LAYOUT = [
    [ 'File', ['Load Claim Information', 'Save Claim Information', 'Exit'] ]
]

LAYOUT = [
    [sg.Menu(MENU_LAYOUT, )],
    [
        sg.Frame(
            'PO Number', layout=[
                [ sg.InputText( key='-PO_NUMBER-', size=(25, 1), pad=(5, 5) ) ]
            ],
            tooltip='The number used in CSN to track the order'
        )
    ],
    [
        sg.Frame(
            'HP Learner ID', layout=[
                [ sg.InputText( key='-LEARNER_ID-', size=(25, 1), pad=(5, 5) ) ]
            ]
        )
    ],
    [
        sg.Frame(
            'Serial Number', layout=[
                [ sg.InputText( key='-SERIAL_NUMBER-', size=(25, 1), pad=(5, 5) ) ]
            ]
        )
    ],
    [
        sg.Text(
            'Product Number',
            size=(14, 1),
            tooltip='For G5 Chromebooks, it\'s "X9U02UT";\n'
            'For G5EE Chromebooks it\'s "1FX82UT";'
            '\nFor G6EE Chromebooks it\'s "3NU57UT" (some have "3PD93UT");'
            '\nFor G7EE Chromebooks, it\'s "6QY22UT"'
        ),
        sg.Combo(
            ['X9U02UT', '1FX82UT', '3NU57UT', '3PD93UT', '6QY22UT'],
            size=(20, 1),
            key='-PRODUCT_NUMBER-'
        )
    ],
    [
        sg.Text(
            'CSN Ship Name',
            size=(14, 1),
            tooltip='The nickname used in the CSN address book,\n'
            'to find the correct shipping address for the parts'
        ),
        sg.Combo(
            ['Elijah - CBTS', 'Nwankwo - CBTS'],
            size=(20, 1),
            key='-SHIP_NAME-'
        )
    ],
    [
        sg.Text(
            'CSN End User',
            size=(14, 1),
            tooltip="The nickname used in the CSN address book, to get\n"
            "the CBTS customer's address and contact information"
        ),
        sg.Combo(
            ['Chris Campbell'],
            size=(20, 1),
            key='-END_USER-'
        )
    ],
    [
        sg.Frame('Part Numbers', layout=[
            [
                sg.Button(
                    'Add Part(s)',
                    key='-ADD_PART_NUMBERS-',
                    button_color=('black', '#a0db8e'),
                    enable_events=True
                )
            ],
            [
                sg.Button(
                    'View Part(s)',
                    key='-VIEW_PART_NUMBERS-',
                    button_color=('black', '#ffd732')
                )
            ],
            [
                sg.Button(
                    'Replace Part(s)',
                    key='-REPLACE_PART_NUMBERS-',
                    button_color=('black', '#f57c00'),
                    tooltip='To remove all part numbers from the claim, and add a set\n'
                    'of new part numbers'
                )
            ]
        ], pad=(5, 5) ),
        sg.Frame('CSN Notes', layout=[
            [
                sg.Button(
                    'Add Note(s)',
                    key='-ADD_NOTES-',
                    button_color=('black', '#a0db8e'),
                    enable_events=True,
                    tooltip='This section is for any additional Chromebook issues,\n'
                    'as well as the problem description/troubleshooting information\n'
                    'for all non-Chromebook claims'
                )
            ],
            [
                sg.Button(
                    'View Note(s)',
                    key='-VIEW_NOTES-',
                    button_color=('black', '#ffd732')
                )
            ],
            [
                sg.Button(
                    'Remove All Notes',
                    key='-REMOVE_NOTES-',
                    button_color=('black', '#ff4040'),
                    enable_events=True,
                    tooltip='Removes all CSN notes from the claim'
                )
            ]
        ], pad=(5, 5) )
    ],
    [
        sg.Checkbox(
            'Multiple Devices Per Ticket',
            size=(25, 1),
            key='-MULTIPLE_DEVICES-',
            default=False,
            tooltip="Checking this box means the PO number field\n"
            "won't be cleared after the order has been submitted.\n"
            "This is for multiple devices in a single ticket"
        )
    ],
    [
        sg.Button(
            'Create',
            tooltip='Creates a new CSN claim',
            size=(6, 1),
            button_color=('white', '#0000ff')
        ),
        sg.Button(
            'Submit',
            size=(6, 1),
            button_color=('white', '#008000'),
            tooltip='Submits all CSN warranty claims for Columbus City Schools'
        ),
        sg.Button(
            'Change Model',
            size=(11, 1),
            button_color=('black', '#c0c0c0'),
            tooltip='Sets all model-specific claim fields back to their default values'
        ),
        sg.Cancel( size=(6, 1), button_color=('black', '#ff4040') )
    ]
]
